package cn.itcast.string.string;

public class Demo05_others {
	public static void main(String args[]){
		String str1="cainter";
		String str2="monster";
		String str3="Cyd er";
		String str4=str1.replace("caint", "print"); //printer
		String[] str5=str2.split("n"); //mo ster
		String str6=str3.substring(2); //d er
		String str7=str3.substring(0,3); //Cyd
		String str8=str1.toUpperCase(); //CAINTER
		String str9=str3.toLowerCase(); //cyd er
		String str10=str4.trim(); //Cyder
		
		System.out.println(str4);
		for(int i=0;i<str5.length;i++){
			System.out.print(str5[i]+"\t");
		}
		System.out.println("\n"+str6);
		System.out.println(str7);
		System.out.println(str8);
		System.out.println(str9);
		System.out.println(str10);
	}
}
